<script setup>
import {useStudyRoomStore} from "@/stores/index.js";

// 引入StudyRoomStore
const studyRoomStore = useStudyRoomStore();

const handleClick = () => {
    studyRoomStore.isUpdateBackground=true;
}



</script>

<template>
  <div class="body">
    <div class="user-message">
      <img src="@/assets/img/avatar.png" alt="" class="avatar">
      <div class="info">
        <div class="name">钟小意</div>
        <div class="number">学号：22331540</div>
      </div>
    </div>
    <div class="f-row">
      <div class="f">
        <img src="@/assets/icon/person1.png" alt="">
        <div class="text">问卷调查</div>
      </div>
      <div class="f">
        <img src="@/assets/icon/person2.png" alt="">
        <div class="text">意见反馈</div>
      </div>
      <div class="f">
        <img src="@/assets/icon/person3.png" alt="">
        <div class="text">隐私说明</div>
      </div>
    </div>
    <div class="f-row">
      <div class="f">
        <img src="@/assets/icon/person4.png" alt="" @click="handleClick">
        <div class="text">自习室背景</div>
      </div>
      <div class="f">
        <img src="@/assets/icon/person5.png" alt="">
        <div class="text">系统通知</div>
      </div>
      <div class="f">
        <img src="@/assets/icon/person6.png" alt="">
        <div class="text">退出登录</div>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.body{
  position: fixed;
  top: 60vh;
  left: 4.8%;
  width: 300px;
  height: 360px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(235, 223, 244, 1) 0%, rgba(226, 233, 250, 1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  z-index: 11;
  .f-row{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    .f{
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 15px;
      img{
        width: 50px;
        height: 50px;
      }
      .text{
        font-size: 15px;
        color: rgba(51, 51, 51, 1);
      }
    }
  }
  .user-message{
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 26px;
    .avatar{
      width: 60px;
      height: 60px;
      border-radius: 50%;
    }
    .info{
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 8px;
      .name{
        font-size: 20px;
        font-weight: 400;
      }
      .number{
        font-size: 15px;
        font-weight: 400;
        color: rgba(133, 133, 133, 1);
      }
    }
  }
}
</style>


